<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        {{message}}
        <h2>{{fullName}}</h2>
        <h2>get方法::{{fullName1}}</h2>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                message: '我是你爹!',
                firstName: '孤鸿寄语·',
                lastName: '默苍离',
            },
            methods: {},
            computed: {
                fullName: function() {
                    return this.firstName + this.lastName;
                },
                fullName1: {
                    set: function() {

                    },
                    get: function() {
                        return this.firstName + this.lastName;
                    }
                }
            }
        });
    </script>
</body>

</html>